A virtualization technology is a decoupling technology for separating a bottom-layer hardware device from an upper-layer operating system and application program. As shown in FIG. 1, a virtual machine monitor (VMM) layer is introduced to directly manage bottom-layer hardware resources, and a virtual machine (virtual machine, VM) that is independent of the bottom-layer hardware is created for the upper-layer operating system and application program to use.
As one of important bottom-layer technologies that support a currently popular cloud computing (cloud computing) platform, the virtualization technology can greatly improve the resource usage efficiency of a physical device. Compared with a conventional physical server, a virtual machine has better isolation and encapsulation performance.
In some existing virtualized scenarios, a host (Host) performs bandwidth limitation or access control based on another policy on an outbound flow of a virtual machine. For example, after a VM sends a packet, the Host first copies the packet from address space of the VM to address space of the Host; the Host deter mines whether the packet exceeds a sending limit, generally discards directly or first caches a packet that exceeds the sending limit, and generally discards directly a packet that exceeds a cache limit.
During a studying and practicing process, the inventor finds that, an existing mechanism in which a Host executes flow control may, on some occasions, cause a serious processing delay (for example, in some scenarios in which the number of VMs is large or scenarios in which the number of packets sent by VM is large), causing a large amount of address space of the Host to be occupied.